<script setup>
defineProps({
  avatar: String,
  nickname: String,
  id: Number,
  role: {
    type: String,
    default: ''
  },
  lucky:{
    type:Object,
    default:{}
  }
})
</script>

<template>
  <div class="user-info">
    <van-image width="30" height="30" fit="cover" :src="avatar" />
    <div class="username">
      <van-text-ellipsis :rows="1" :content="nickname" class="nickname"></van-text-ellipsis>
      <p>id:{{ id }} {{ role }}</p>
    </div>
    <div class="username">
        人数：{{ lucky.num }}
    </div>
  </div>
</template>

<style scoped lang="less">
.user-info {
  flex: 1;
  display: flex;
  align-items: center;

  .username {
    flex: 1;
    font-size: 12px;
    margin-left: 10px;

    .nickname {
      /* min-width: 90px; */
      max-width: 120px;
    }

    p:last-child {
      font-size: 14px;
    }
  }
}

</style>